import { ElDivider, ElPageHeader } from 'element-plus'
import { defineComponent, Fragment } from 'vue'
import { useI18n } from 'vue-i18n'
import { RouterView, useRouter } from 'vue-router'

export default defineComponent({
  setup() {
    const { t } = useI18n()
    const router = useRouter()

    return () => (
      <Fragment>
        <ElPageHeader
          onBack={() => {
            router.push('/map')
          }}
        >
          {{
            title: () => t('fan-hui')
          }}
        </ElPageHeader>
        <ElDivider></ElDivider>
        <RouterView />
      </Fragment>
    )
  }
})
